Skip to content

feat: add missing TimeFrame enum members for common exchange candle intervals#413

Merged
MDUYN merged 1 commit into
devfrom
squad/412-add-timeframe-enum-members
Apr 4, 2026
Merged

feat: add missing TimeFrame enum members for common exchange candle intervals#413
MDUYN merged 1 commit into
devfrom
squad/412-add-timeframe-enum-members

Conversation

@MDUYN
Copy link
Copy Markdown
Collaborator

@MDUYN MDUYN commented Apr 4, 2026

Summary

Add four missing TimeFrame enum members that are widely supported by major crypto exchanges (Binance, Bybit, OKX, Kraken):

Member Value Minutes Available on
TWENTY_MINUTE 20m 20 Bybit
SIX_HOUR 6h 360 Binance, Bybit, OKX
EIGHT_HOUR 8h 480 Binance, Bybit, OKX
THREE_DAY 3d 4320 Binance

Changes

  • Added 4 new enum members in correct chronological order
  • Added corresponding amount_of_minutes entries
  • Fixed from_string to handle uppercase variants for lowercase hour values (e.g. "6H" -> SIX_HOUR)
  • Added 42 unit tests covering enum values, minute counts, parsing, equality, and ordering

Impact

Backwards compatible — only adds new enum members. No changes to existing behavior.

Closes #412

…ntervals

Add TWENTY_MINUTE (20m), SIX_HOUR (6h), EIGHT_HOUR (8h), and THREE_DAY (3d)
enum members to support candle intervals available on Binance, Bybit, OKX,
and other major exchanges.

Also fix from_string to handle uppercase variants for lowercase hour values
(e.g. '6H' -> SIX_HOUR), closing a gap in the existing case-handling logic.

Closes #412
@MDUYN MDUYN merged commit 084c603 into dev Apr 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant